home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 January / Macworld (1998-01).dmg / FileMaker Pro 4 / Full FM4 Web / shopping_cart / includes / nav.js < prev    next >
Encoding:
Text File  |  1997-09-14  |  3.0 KB  |  2 lines  |  [TEXT/ttxt]

  1. <!--Begin Include: nav.js-->
  2.  
  3. <SCRIPT LANGUAGE="JavaScript">
  4.         <!--Hide from older browsers
  5.         var app;
  6.         ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3)) ? versionOK=true : versionOK=false;
  7.         
  8.         // Localize here...
  9.         back_txt = "Go back to your previous page.";
  10.         find_txt = "Perform Your Search.";
  11.         checkout_txt = "Check Out Your Purchase.";
  12.         cont_txt = "Continue With Your Purchase.";
  13.         update_txt = "Update Your Information.";
  14.         buy_txt = "Purchase this item.";
  15.         del_txt = "Delete this item from your cart.";
  16.         edit_txt = "Change the purchase quantity of this item.";
  17.         search_txt = "Search Our Catalog.";
  18.         specials_txt = "See Our Specials.";
  19.         browse_txt = "Browse Our Catalog.";
  20.         cart_txt = "View Your Shopping Cart.";
  21.         random_txt = "See a Random Album.";
  22.         // ...end localize
  23.             
  24.         if (versionOK)
  25.         {
  26.             back = new Image();
  27.             back_active = new Image();
  28.             find = new Image();
  29.             find_active = new Image();
  30.             checkout = new Image();
  31.             checkout_active = new Image();
  32.             cont = new Image();
  33.             cont_active = new Image();
  34.             update = new Image();
  35.             update_active = new Image();
  36.             buy = new Image();
  37.             buy_active = new Image();
  38.             del = new Image();
  39.             del_active = new Image();
  40.             edit = new Image();
  41.             edit_active = new Image();
  42.             search = new Image();
  43.             search_active = new Image();
  44.             specials = new Image();
  45.             specials_active = new Image();
  46.             browse = new Image();
  47.             browse_active = new Image();
  48.             cart = new Image();
  49.             cart_active = new Image();
  50.  
  51.             back.src = "images/back1.gif";
  52.             back_active.src = "images/back2.gif";
  53.             find.src = "images/find1.gif";
  54.             find_active.src = "images/find2.gif";
  55.             checkout.src = "images/checkout1.gif";
  56.             checkout_active.src = "images/checkout2.gif";
  57.             cont.src = "images/continue1.gif";
  58.             cont_active.src = "images/continue2.gif";
  59.             update.src = "images/update1.gif";
  60.             update_active.src = "images/update2.gif";
  61.             buy.src = "images/buy1.gif";
  62.             buy_active.src = "images/buy2.gif";
  63.             del.src = "images/delete1.gif";
  64.             del_active.src = "images/delete2.gif";
  65.             edit.src = "images/edit1.gif";
  66.             edit_active.src = "images/edit2.gif";
  67.             search.src = "images/search1.gif";
  68.             search_active.src = "images/search2.gif";
  69.             specials.src = "images/specials1.gif";
  70.             specials_active.src = "images/specials2.gif";
  71.             browse.src = "images/browse1.gif";
  72.             browse_active.src = "images/browse2.gif";
  73.             cart.src = "images/cart1.gif";
  74.             cart_active.src = "images/cart2.gif";
  75.         }
  76.         
  77.         function helptxt ( name )
  78.         {
  79.             if ( name == "" )
  80.                 self.status = "";
  81.             else
  82.                 self.status = eval(name + "_txt");
  83.             return true;
  84.         }
  85.     
  86.         function setimg ( name, activate )
  87.         {
  88.             var obj;
  89.             var indx;
  90.             if (versionOK)
  91.             {
  92.                 indx = name.indexOf(".");
  93.                 if (indx > 0 )
  94.                     obj = name.substring(0,indx);
  95.                 else
  96.                     obj = name;
  97.                 if (activate)
  98.                 {
  99.                     document[name].src = eval(obj + "_active" + ".src");
  100.                     return helptxt ( obj );
  101.                 }
  102.                 else
  103.                 {
  104.                     document[name].src = eval(obj + ".src");
  105.                     return helptxt ( "" );
  106.                 }
  107.             }
  108.             
  109.         }
  110.         //End hiding-->
  111.     </SCRIPT>
  112.  
  113. <!--End Include: nav.js-->
  114.